package com.yingside.collection.stack;

import com.yingside.collection.Student;

public class Test {
    public static void main(String[] args) {

        Student s1 = new Student(1,"zs","111");
        Student s2 = new Student(2,"ls","222");
        Student s3 = new Student(3,"ww","333");
        Student s4 = new Student(4,"zl","444");

        IStack<Student> stack = new MyStack<>();

        stack.push(s1);
        stack.push(s2);
        stack.push(s3);
        stack.push(s4);

        stack.display();

        Student pop = stack.pop();
        System.out.println("pop = " + pop);
        System.out.println("size = " + stack.size());

    }
}
